import mysql.connector as mysqlConnector

con = mysqlConnector.connect( host="localhost",
                        user="root",
                        passwd="123456",
                        database = "test")

exc = con.cursor()
exc.execute("select * from tb_user")
for i in exc.fetchone():
    print(i)

exc.close()
con.close()